import request from '@/utils/request'

// 查询设备故障记录列表
export function listDeviceFaultRecord(query) {
  return request({
    url: '/business/deviceFaultRecord/list',
    method: 'get',
    params: query
  })
}

// 查询设备故障记录详细
export function getDeviceFaultRecord(id) {
  return request({
    url: '/business/deviceFaultRecord/' + id,
    method: 'get'
  })
}

// 新增设备故障记录
export function addDeviceFaultRecord(data) {
  return request({
    url: '/business/deviceFaultRecord',
    method: 'post',
    data: data
  })
}

// 修改设备故障记录
export function updateDeviceFaultRecord(data) {
  return request({
    url: '/business/deviceFaultRecord',
    method: 'put',
    data: data
  })
}

// 删除设备故障记录
export function delDeviceFaultRecord(id) {
  return request({
    url: '/business/deviceFaultRecord/' + id,
    method: 'delete'
  })
}


// 查询设备故障记录饼状分析图数据
export function getDeviceFaultRecordBin(id) {
  return request({
    url: '/business/deviceFaultRecord/getMapInfoByDeviceId/' + id,
    method: 'get'
  })
}
